<%@ page language="java" contentType="text/html; charset=UTF-8"
    import="java.util.*,model.common.SellSituation,
    dao.common.SellSituationDao,
    action.common.SellSituationAction"
    pageEncoding="UTF-8"%>
<%
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ request.getContextPath() + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<base href="<%=basePath%>">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<title>Insert title here</title>
<link rel="stylesheet" type="text/css" href="css/SellSituation.css" />
</head>  
<body>
<img src="img/未标题-1.jpg" width="1080" height="100" />
<div id="Home">
  <ul>
<li><a href="managerHome.jsp">首页</a></li>
   <li><a>用户管理</a>
     <ul>
       <li><a href="employee.jsp">员工信息</a></li>
       <li><a href="manager.jsp">店长信息</a></li>
       <li><a href="jobsituation.jsp">在职情况</a></li>
     </ul>
     
   </li> 
   <li><a>进货管理</a>
     <ul>
       <li><a href="stockplan.jsp">进货计划</a></li>
       <li><a href="loggingnewgoods.jsp">新商品录入</a></li>
     </ul>  
   
   </li>
   <li><a>库存管理</a>
     <ul>
       <li><a href="repertory.jsp">库存查询</a></li>
     </ul>
   
   </li>
   <li><a>销售管理</a>
     <ul>
       <li><a href="sellsituation.jsp">销售情况</a></li>
     </ul>   
   
   </li>
   <li><a>系统</a>
     <ul>
       <li><a href="systemMessage.jsp">系统报告</a></li>
     </ul>   
   
   </li>
</div>
   
<table class="datalist" id="SellSituation">  
   <caption><strong><h1>销售情况表</h1></strong></caption>
    <tr>  
        <th scope="col"><strong>商品编号</strong></th>  
        <th scope="col"><strong>商品名称</strong></th> 
        <th scope="col"><strong>商品进价</strong></th> 
        <th scope="col"><strong>商品售价</strong></th>  
        <th scope="col"><strong>销售总额</strong></th> 
        <th scope="col"><strong>销售总数</strong></th>  
        <th scope="col"><strong>商品厂家</strong></th>  
        <th scope="col"><strong>销售编号</strong></th> 
        <th scope="col"><strong>销售详情</strong></th> 
        <th scope="col"><strong>记录人</strong></th> 
        <th scope="col"><strong>记录时间</strong></th>
        <th scope="col"><strong>进行操作</strong></th>       
    </tr>
    
    <%
    request.setCharacterEncoding("utf-8");
    response.setContentType("text/html; charset=utf-8");
	List<SellSituation> list=new ArrayList<SellSituation>(); 
	SellSituationAction act=new SellSituationAction();
		list=act.query(null);
		request.getSession().setAttribute("SellSituation",list);
   
	//List list;
	if(session.getAttribute("SellSituation")!=null){
		list=(List)session.getAttribute("SellSituation");
		if(list.size()>0){
			SellSituation s;
			for(int i=0;i<list.size();i++){
				s=new SellSituation();
				s=(SellSituation)list.get(i);
				%>

		<tr>
			
			<td scope="col"><strong><%=s.getGoodsId()%></strong></td>
			<td scope="col"><strong><%=s.getGoodsName()%></strong></td>
			<td scope="col"><strong><%=s.getGoodsUnitPrice()%></strong></td>
			<td scope="col"><strong><%=s.getGoodsPrice()%></strong></td>
			<td scope="col"><strong><%=s.getGoodsSellSum()%></strong></td>
			<td scope="col"><strong><%=s.getSellTotalNum()%></strong></td>
			<td scope="col"><strong><%=s.getGoodsManufacturer() %></strong></td>
			<td scope="col"><strong><%=s.getSellingId()%></strong></td>
			<td scope="col"><strong><%=s.getSellDetails()%></strong></td>
			<td scope="col"><strong><%=s.getRecorder()%></strong></td>
			<td scope="col"><strong><%=s.getRecordDate()%></strong></td>
			<td><a href="DeleteRepertory?id=<%=s.getGoodsId()%>" style="width: 35px; display: block; float: left" />删除</a>
				<a href="editRepertory.jsp?id=<%=s.getGoodsId()%>" style="width: 35px; display: block; float: right" />修改</a></td>
		</tr>
		<%
		        	}
				}
			}
		%>  
    <tr>                    
        <td>&nbsp;</td>  
        <td>&nbsp;</td>  
        <td>&nbsp;</td>  
        <td>&nbsp;</td>  
        <td>&nbsp;</td>  
        <td>&nbsp;</td>  
        <td>&nbsp;</td>  
        <td>&nbsp;</td>  
        <td>&nbsp;</td> 
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
    </tr>  
    <tr class="altrow">       
        <td>&nbsp;</td>  
        <td>&nbsp;</td>  
        <td>&nbsp;</td>  
        <td>&nbsp;</td>  
        <td>&nbsp;</td>  
        <td>&nbsp;</td>  
        <td>&nbsp;</td>  
        <td>&nbsp;</td>  
        <td>&nbsp;</td> 
        <td>&nbsp;</td> 
        <td>&nbsp;</td>
        <td>&nbsp;</td>      
    </tr>  
    <tr>                   
        <td>&nbsp;</td>  
        <td>&nbsp;</td>  
        <td>&nbsp;</td>  
        <td>&nbsp;</td>  
        <td>&nbsp;</td>  
        <td>&nbsp;</td>  
        <td>&nbsp;</td>  
        <td>&nbsp;</td>  
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
    </tr>  
</body>
</html>